package com.quanyan.comment.reqeust;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2016/5/28.
 * 用户收藏请求接口
 */
public class ReqUserCollect implements Serializable{
    /** 来源系统编码 不为空**/
    @NotBlank(message = "systemCode不能为空")
    private String systemCode;

    /** 来源系统业务编码 不为空**/
    @NotBlank(message = "businessCode不能为空")
    private String businessCode;

    /** 用户id 不为空**/
    @NotNull(message = "userId")
    private Integer userId;

    /** 评论具体业务id 不为空**/
    @NotNull(message = "businessId不能为空")
    private Integer businessId;

    @NotNull(message = "status不能为空，1：收藏 0：取消收藏")
    private Integer status;


    public ReqUserCollect() {
    }

    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    public String getBusinessCode() {
        return businessCode;
    }

    public void setBusinessCode(String businessCode) {
        this.businessCode = businessCode;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "ReqUserCollection{" +
                "systemCode='" + systemCode + '\'' +
                ", businessCode='" + businessCode + '\'' +
                ", userId=" + userId +
                ", businessId=" + businessId +
                ", status=" + status +
                '}';
    }

    public Map<String,Object> toMap(){
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("systemCode",systemCode);
        map.put("businessCode",businessCode);
        map.put("userId",userId);
        map.put("businessId",businessId);
        map.put("status",status);
        return  map;
    }
}
